package com.jy.api.payReq;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class AllPayJsPayResult {
    protected String version;

    protected String charset;

    protected String signType;

    protected String status;

    protected String message;

    private String resultCode;

    private String mchId;

    private String deviceInfo;

    private String nonceStr;

    private String errCode;

    private String errMsg;

    private String sign;

    private String tokenId;

    private String payInfo;

    public boolean isSuccess() {
        if (status.equals("0") && StringUtils.isNotEmpty(resultCode) && resultCode.equals("0")) {
            return true;
        } else {
            return false;
        }
    }

}
